\(\int (a+\frac {b}{x}) x^2 \, dx\) [1550]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 17 \[ \int \left (a+\frac {b}{x}\right ) x^2 \, dx=\frac {b x^2}{2}+\frac {a x^3}{3} \]

[Out]

1/2*b*x^2+1/3*a*x^3

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14} \[ \int \left (a+\frac {b}{x}\right ) x^2 \, dx=\frac {a x^3}{3}+\frac {b x^2}{2} \]

[In]

Int[(a + b/x)*x^2,x]

[Out]

(b*x^2)/2 + (a*x^3)/3

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \left (b x+a x^2\right ) \, dx \\ & = \frac {b x^2}{2}+\frac {a x^3}{3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00 \[ \int \left (a+\frac {b}{x}\right ) x^2 \, dx=\frac {b x^2}{2}+\frac {a x^3}{3} \]

[In]

Integrate[(a + b/x)*x^2,x]

[Out]

(b*x^2)/2 + (a*x^3)/3

Maple [A] (verified)

Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.82

method result size
gosper \(\frac {x^{2} \left (2 a x +3 b \right )}{6}\) \(14\)
default \(\frac {1}{2} b \,x^{2}+\frac {1}{3} a \,x^{3}\) \(14\)
norman \(\frac {1}{2} b \,x^{2}+\frac {1}{3} a \,x^{3}\) \(14\)
risch \(\frac {1}{2} b \,x^{2}+\frac {1}{3} a \,x^{3}\) \(14\)
parallelrisch \(\frac {1}{2} b \,x^{2}+\frac {1}{3} a \,x^{3}\) \(14\)

[In]

int((a+b/x)*x^2,x,method=_RETURNVERBOSE)

[Out]

1/6*x^2*(2*a*x+3*b)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.76 \[ \int \left (a+\frac {b}{x}\right ) x^2 \, dx=\frac {1}{3} \, a x^{3} + \frac {1}{2} \, b x^{2} \]

[In]

integrate((a+b/x)*x^2,x, algorithm="fricas")

[Out]

1/3*a*x^3 + 1/2*b*x^2

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.71 \[ \int \left (a+\frac {b}{x}\right ) x^2 \, dx=\frac {a x^{3}}{3} + \frac {b x^{2}}{2} \]

[In]

integrate((a+b/x)*x**2,x)

[Out]

a*x**3/3 + b*x**2/2

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.76 \[ \int \left (a+\frac {b}{x}\right ) x^2 \, dx=\frac {1}{3} \, a x^{3} + \frac {1}{2} \, b x^{2} \]

[In]

integrate((a+b/x)*x^2,x, algorithm="maxima")

[Out]

1/3*a*x^3 + 1/2*b*x^2

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.76 \[ \int \left (a+\frac {b}{x}\right ) x^2 \, dx=\frac {1}{3} \, a x^{3} + \frac {1}{2} \, b x^{2} \]

[In]

integrate((a+b/x)*x^2,x, algorithm="giac")

[Out]

1/3*a*x^3 + 1/2*b*x^2

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.76 \[ \int \left (a+\frac {b}{x}\right ) x^2 \, dx=\frac {x^2\,\left (3\,b+2\,a\,x\right )}{6} \]

[In]

int(x^2*(a + b/x),x)

[Out]

(x^2*(3*b + 2*a*x))/6